package services

import (
	viewmodels "{{.ProjectName}}/view_models"

	"gitee.com/wu-jin-feng/fgin"
	"github.com/gin-gonic/gin"
)

type PublicService struct{}

func (s *PublicService) Ping(ctx *gin.Context) (viewmodels.PublicOutput, error) {
	out := viewmodels.PublicOutput{}
	input := viewmodels.PublicInput{}
	if err := fgin.FbindParams(ctx, &input); err != nil {
		return out, err
	}
	out.Resp = "ping test " + input.Name
	return out, nil
}
